package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.system.domain.PQuestion;
import com.ruoyi.system.domain.vo.PQuestionVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问题Mapper接口
 *
 * @author ruoyi
 * @date 2022-07-19
 */
public interface PQuestionMapper extends BaseMapperPlus<PQuestionMapper, PQuestion, PQuestionVo> {

    /**
     * 查询list
     */
    List<PQuestion> selectMyList(@Param("pageQuery") PageQuery pageQuery, @Param(Constants.WRAPPER) Wrapper<PQuestion> queryWrapper, @Param("type") String type);

    /**
     * 前端-问题详情
     */
    PQuestion selectVoByMyId(@Param("id") Long id, @Param("type") String type);

    Long selectSumReadNum(@Param("typeId") Long typeId);
}
